import { Column, Model, Table } from 'sequelize-typescript'
import Reply from './reply'
@Table({
  tableName: 'evaluate',
})
export default class Evaluate extends Model<Evaluate> {
  @Column({
    primaryKey: true,
    autoIncrement: true,
  })
  @Column
  public evaluateid!: number
  @Column
  content!:string
  @Column// 发表人
  evaluator! :string
  @Column
  isbn!: string
  @Column
  headportrai!:string
  @Column//点赞数
  givealikenum!:string
  @Column
  evaluatedegree!: string // 评价级别
  @Column
  pubdate!: Date //发表日期
  @Column
  isanonymous!: number //是否是匿名用户
    // 有特殊用处
  replyid! : number
  replycontent!: string
  replydate!: Date // 发表人
  replyor!: string
  evalid!: number
  replyLst: Pick<Reply,'replyid' | 'replycontent' | 'replydate' | 'replyor' | 'evalid'>[] = []
}
